package mhcs.client;

import com.google.gwt.user.client.ui.Image;

class ConfigImage implements Comparable<ConfigImage> {
    
    public ConfigImage(String path, int serial, int x, int y) {
        this.serial = serial;
        this.x = --x;
        this.y = 50 - y;
        image = new Image(path);
        image.setPixelSize(20, 20);
    }

    @Override
    public int compareTo(ConfigImage o) {
        return serial - o.getSerial();
    }
    
    public int getX() {
        return x;
    }
    
    public int getY() {
        return y;
    }
    
    public int getSerial() {
        return serial;
    }
    
    public Image getImage() {
        return image;
    }
    
    private int x;
    private int y;
    private int serial;
    private Image image;
}